/*
 * MyMagazineListboxContentControl.h
 *
 *  Created on: 2011-3-11
 *      Author: 
 */

#ifndef MyMagazineListboxContentControl_H_
#define MyMagazineListboxContentControl_H_
#include "YuebaoTabControl.h"
#include <e32std.h>
#include "fBaseControl.h"
#include "YuebaoLabel.h"
class fListbox;
class fEngine;

class MyMagazineListboxContentControl : public fTabContentControl
{
public:
    ~MyMagazineListboxContentControl( );
    static MyMagazineListboxContentControl *NewL( fEngine * aEngine, TRect rect );
    static MyMagazineListboxContentControl *NewLC( fEngine * aEngine, TRect rect );
private:
    MyMagazineListboxContentControl( );
    void ConstructL( fEngine * aEngine, TRect rect );
public:
    void RenderFrame( );
    void HandleKey( f_KEY_DES * aKeyDes );
    TInt HandleMouse( fMouseEvent nType, TPoint sPoint );
protected:
    virtual bool WillHandleKey( )
    {
        return ( _listbox && _listbox->IsVisible( ) );
    }
    virtual void GetFocused( )
    {
        if( _listbox && _listbox->IsVisible( ) )
        {
            _listbox->MakeFocused( ETrue );
        }
    }
    virtual void LostFocuse( )
    {
        if( _listbox && _listbox->IsVisible( ) )
        {
            _listbox->MakeFocused( EFalse );
        }
        iEngine->HideCourse();
    }
public:
    fListbox* _listbox;
    fLabel* _label;
};

#endif /* MyMagazineListboxContentControl_H_ */
